/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package demo902;

/**
 *
 * @author Administrator
 */
import java.util.*;

public class Sum {
    public static int sum(int a,int b){
//    int sum=a+b;
//        if (a == b) {
//           sum=sum*2;
//        }
//        return sum;
        if(a==b){
            return 2*(a+b);
        }
        return a+b;
        
    }

    public static void main(String[] args) {
        int a,b;
        Scanner reader = new Scanner(System.in);
        a = reader.nextInt();
        b = reader.nextInt();
        
        System.out.println(sum(a,b));

       

    }
}
